Skip to content

Fix completion for object-valued constants - #348

Open
KarelKuhpastGaben wants to merge 2 commits into
eclipse-pdt:masterfrom
KarelKuhpastGaben:fix-347-object-constant-completion
Open

KarelKuhpastGaben wants to merge 2 commits into
eclipse-pdt:masterfrom
KarelKuhpastGaben:fix-347-object-constant-completion

Conversation

@KarelKuhpastGaben

Copy link
Copy Markdown

Fix completion for object-valued constants

Summary

  • recognize a bare constant as a possible receiver before ->
  • resolve ConstantReference expressions through constant declarations
  • infer the type of non-scalar expressions passed as the value to define()
  • add a PHP 8.1 regression test for member completion on an object-valued constant

Verification

  • compiled the modified Java sources against PDT 8.5.0.202603232127 with Java 21
  • installed the patched org.eclipse.php.core bundle in Eclipse and verified that member completion works in the original project
  • added testObjectValuedConstant.pdtt to the PHP 8.1 code-assist suite

Fixes #347

Resolve bare constant receivers through type inference and allow define() values to be arbitrary expressions.

Fixes eclipse-pdt#347

Signed-off-by: KarelKuhpastGaben <karel@kuhpast.cz>
@KarelKuhpastGaben
KarelKuhpastGaben force-pushed the fix-347-object-constant-completion branch 2 times, most recently from e7d9f95 to 5041cf8 Compare September 25, 2026 16:13
@KarelKuhpastGaben
KarelKuhpastGaben force-pushed the fix-347-object-constant-completion branch from 5041cf8 to 8bf5398 Compare October 26, 2026 09:03
Signed-off-by: KarelKuhpastGaben <karel@kuhpast.cz>
@KarelKuhpastGaben

Copy link
Copy Markdown
Author

Hi @zulus, could you please approve the pending GitHub Actions workflows for this first-time contribution? Both the Tycho build and License vetting workflows are currently blocked with action_required; the previous runs expired while waiting for approval. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Object-valued global constants have no member completion

2 participants